﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ActivityMediaEdit.aspx.cs"
	Inherits="SBACN.WebSite.Admin.ActivityMediaEdit" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
	<title>内容编辑</title>
	<link href="images/style.css" rel="stylesheet" type="text/css" />
	<link href="images/form.css" rel="stylesheet" type="text/css" />
	<script type="text/javascript" src="/Scripts/jquery-1.7.2.min.js"></script>
	<script type="text/javascript" src="/My97DatePicker/WdatePicker.js"></script>
	<script type="text/javascript" src="/xheditor/xheditor-1.1.13-zh-cn.min.js"></script>
	<script type="text/javascript">
				var $jqy = jQuery.noConflict();
				function ImageNewsChecked(sender) {
					if (sender && sender.checked) {
						$jqy("#tr_ImageNews").show();
					}
					else {
						$jqy("#tr_ImageNews").hide();
					}
				}

				$jqy(pageInit);
				function pageInit() {
					if(<%= ExEdit.ToString().ToLower()%>)
						{
						$jqy('#txt_Content').xheditor({
							upLinkUrl: "/Handler/UploadHandler.ashx?tc=<%= SystemType%>",
							upLinkExt: "<%= UploadFileTypes%>",
							upImgUrl: "/Handler/UploadHandler.ashx?tc=<%= SystemType%>",
							upImgExt: "<%= UploadFileTypes%>",
							upFlashUrl: "/Handler/UploadHandler.ashx?tc=<%= SystemType%>",
							upFlashExt: "<%= UploadFileTypes%>",
							upMediaUrl: "/Handler/UploadHandler.ashx?tc=<%= SystemType%>",
							upMediaExt: "<%= UploadFileTypes%>",
							onUpload: insertUpload
						}); 
						$jqy("#tr_exOption").show();
						$jqy("#tr_Content").show(); 
					}
					else
					{ 
						$jqy("#tr_exOption").hide();
						$jqy("#tr_Content").hide(); 
					}
				} 
				function insertUpload(arrMsg) {
					var i, msg;
					for (i = 0; i < arrMsg.length; i++) {
						//msg = arrMsg[i];
					}
				}
				 
				function cancel() {
					if (window.opener != null) {
						window.opener = null;
					}
					window.close();
					return false;
				}

		function Check() {
			var Name = $jqy("#<%= txt_MName.ClientID %>").val();
			if (Name == "") {
				alert("请填写报道媒体！");
				return false;
			}

			var tit = $jqy("#<%= txt_title.ClientID %>").val();
			if (tit == "") {
				alert("请填写报道标题！");
				return false;
			}

			var date = $jqy("#<%= txt_ReportDate.ClientID %>").val();
			if (date == "") {
				alert("请选择日期！");
				return false;
			}

			return true;
		}
	</script>
</head>
<body>
	<form id="form1" runat="server">
	<center>
		<div id="contentDiv">
			<table width="100%" border="0" cellspacing="0" cellpadding="0" class="table-stroke2">
				<tr>
					<td colspan="2" class="form-title2">
						<%= this.Header.Title%>
					</td>
				</tr>
				<tr>
					<td width="16%" class="form-label-1">
						<span style="color: Red">*</span>报道标题:
					</td>
					<td width="84%" class="form-body-1">
						<asp:TextBox TabIndex="0" ID="txt_title" runat="server" MaxLength="100" Width="97%"></asp:TextBox>
					</td>
				</tr>
				<tr>
					<td width="16%" class="form-label-1">
						<span style="color: Red">*</span>报道媒体:
					</td>
					<td width="84%" class="form-body-1">
						<asp:TextBox TabIndex="0" ID="txt_MName" runat="server" MaxLength="100" Width="97%"></asp:TextBox>
					</td>
				</tr>
				<tr>
					<td width="16%" class="form-label-1">
						<span style="color: Red">*</span>发布时间:
					</td>
					<td width="84%" class="form-body-1">
						<asp:TextBox ID="txt_ReportDate" CssClass="Wdate" runat="server" onClick="WdatePicker()"
							MaxLength="20" Width="120px"></asp:TextBox>
					</td>
				</tr>
				<tr id="tr_Content">
					<td width="16%" class="form-label-1">
						内容:
					</td>
					<td width="84%" class="form-body-1">
						<asp:TextBox ID="txt_Content" runat="server" Height="270px" Width="98%" TextMode="MultiLine"></asp:TextBox>
					</td>
				</tr>
				<td class="form-body" colspan="2">
					<asp:Label ID="lbl_Message" Text="&nbsp;" runat="server" ForeColor="Red"></asp:Label>
				</td>
				<tr>
					<td class="form-body" colspan="2">
						<asp:Button ID="btn_Save" CssClass="btnsearch" Text="确定" runat="server" OnClick="btn_Save_Click"
							OnClientClick=" return Check();" />&nbsp;
						<asp:Button ID="btn_Cancel" Text="取消" class="btnsearch" runat="server" OnClientClick="return cancel();" />
					</td>
				</tr>
			</table>
	</center>
	</form>
</body>
</html>
